/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.wrox.beginspring.pix.dao.impl;

import com.wrox.beginspring.pix.dao.PixUserDao;
import com.wrox.beginspring.pix.model.PixUser;
import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate3.HibernateTemplate;

/**
 *
 * @author nika
 */
public class PixUserDaoImpl implements PixUserDao {

    private HibernateTemplate hibernateTemplate;

    public void setSessionFactory(SessionFactory sessionFactory) {
        this.hibernateTemplate = new HibernateTemplate(sessionFactory);
    }

    @Override
    public void savePixUser(PixUser pixUser) {
        hibernateTemplate.saveOrUpdate(pixUser);
    }
}
